/*
 * MovePlaceCommand.java
 *
 * Created on 26 maj 2007, 21:18
 */

package edu.uj.petri.commands;

import edu.uj.petri.view.PlaceView;
import java.awt.geom.Point2D;
import java.util.ResourceBundle;

/**
 *
 * @author Paweł
 */
public class MovePlaceCommand extends Command {
    
    private PlaceView placeView;
    private Point2D start;
    private Point2D end;
    
    /** Creates a new instance of MoveTransitionCommand */
    public MovePlaceCommand( PlaceView placeView, Point2D start, Point2D end ) {
        
        this.placeView = placeView;
        this.start = start;
        this.end = end;
    }

    public String toString() {
        
        return ResourceBundle.getBundle("edu/uj/petri/messages").getString("przesuniecie_tranzycji");
    }

    void execute() {
        
        placeView.move(start, end);
    }

    void undo() {
        
        placeView.move(end, start);
    }

    boolean canBeCombined(Command c) {
        
        return false;
    }

    private static final long serialVersionUID = 57570192105555054L;
    
}
